const file = '舆情来源占比';
const fontSize = 54;
const option = {
    series: [
      {
        name: 'Access From',
        type: 'pie',
        radius: ['40%', '89%'],
        center:['50%', '50%'],
        avoidLabelOverlap: false,
        itemStyle: {
          borderRadius: 40,
          borderColor: '#fff',
          borderWidth: 2
        },
        label: {
          show: false,
          position: 'center'
        },
        emphasis: {
          label: {
            show: true,
            fontSize: 40,
            fontWeight: 'bold'
          }
        },
        labelLine: {
          show: true,
          showAbove: true,
          length: 40,
          length2: 40,
          lineStyle:{
            width: 5
          }
        },
        label: {
            show: true,
            position: 'outside',
            fontSize: fontSize,
            color: '#000',
            formatter: function (params) {
              // 对value进行字符串处理，保留小数点后的0
              return params.name;
              }
            },
        data: [				
          { value: 32, name: '110警情(1178)', percent: 71.1},
          { value: 5, name: '华龙问政网(68)', percent: 11.1 },
          { value: 4, name: '抖音(7)', percent: 9.0 },
          { value: 2, name: '微博(5)', percent: 4.4 },
          { value: 2, name: '人民网\n领导留言板(4)', percent: 4.4 },
          { value: 2, name: '小红书(4)', percent: 4.4 },
        ]
      },
      {
        name: 'Access From',
        type: 'pie',
        radius: ['40%', '89%'],
        center:['50%', '50%'],
        avoidLabelOverlap: false,
        itemStyle: {
          borderRadius: 40,
          borderColor: '#fff',
          borderWidth: 2
        },
        label: {
          show: false,
          position: 'center'
        },
        emphasis: {
          label: {
            show: true,
            fontSize: 40,
            fontWeight: 'bold'
          }
        },
        
        label: {
            show: true,
            position: 'inside',
            offset: [0, 21],
            fontSize: fontSize,
            color: '#fff',
            formatter: function (params) {
              // 对value进行字符串处理，保留小数点后的0
              return params.value.toFixed(1) + '%';
              }
            },
        data: [
          { value: 32, name: '110警情(1178)', percent: 71.1},
          { value: 5, name: '华龙问政网(68)', percent: 11.1 },
          { value: 4, name: '抖音(7)', percent: 9.0 },
          { value: 2, name: '微博(5)', percent: 4.4 },
          { value: 2, name: '人民网\n领导留言板(4)', percent: 4.4 },
          { value: 2, name: '小红书(4)', percent: 4.4 },

          // { value: 71.1, name: '华龙问政网(32)'},
          // { value: 11.1, name: '抖音(5)'},
          // { value: 9.0, name: '人民网\n领导留言板(4)'},
          // { value: 4.4, name: '小红书(2)'},
          // { value: 4.4, name: '今日头条(2)'},
        ]
      }
    ]
  };